import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {DomSanitizer} from "@angular/platform-browser";
import $ from 'jquery';

@IonicPage()
@Component({
    selector: 'page-information-link',
    templateUrl: 'information-link.html',
})
export class InformationLinkPage {
    // 外链标题
    private title: string;
    // 外链链接
    private link: any;

    constructor(private navCtrl: NavController, private sanitizer: DomSanitizer, private navParams: NavParams) {

    }

    public backButtonHandle = () => this.backClickHandle();

    ionViewDidLoad() {
        this.link = this.sanitizer.bypassSecurityTrustResourceUrl(this.navParams.get('link'));
        this.title = this.navParams.get('title');
    }

    // 返回
    backClickHandle() {
        this.navCtrl.pop();
    }
}
